package routes

import (
	"gitee.com/song-yao-shun/MQH/controller"
	"gitee.com/song-yao-shun/MQH/middleware"
	"github.com/gin-gonic/gin"
)

func ApplicationRoutes(r *gin.Engine){
	appController := controller.NewApplicationController()

	post := r.Group("api/applications",middleware.AuthMiddleware())
	{
		post.POST("",appController.Create)
		post.PUT("/:id",appController.Update)
		post.GET("/:id",appController.Show)
		post.DELETE("/:id",appController.Delete)
		post.POST("/getall",appController.List)
	}
}